// k.js
// 获取应用实例
const app = getApp()

Page({
  data: {
   k:0
  },
shizhan:function(){
  var that=this
  wx.showModal({
    title: '提示',
    content: '实战完记得回来自评哦~',
    success (res) {
      if (res.confirm) {
        wx.switchTab({
          url: '/pages/ballpark/ballpark',
           })
        that.setData({
          k:that.data.k+1
        })
        console.log(k)
      } else if (res.cancel) {
        console.log('用户点击取消')
        that.setData({
          k:that.data.k
        })
        console.log(k)
      }
    }
  })
// wx.switchTab({
//   url: '/pages/ballpark/ballpark',
// })

},


  zaikan:function(){
wx.pageScrollTo({
  duration: 300,
  scrollTop:0
})

  }
})